﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="iReaderMMS.aspx.cs" Inherits="iReaderMMS" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="stylesheets/layout-css-1.css" rel="stylesheet" />
    <link href="stylesheets/reset.css" rel="stylesheet" />
  <script type="text/javascript">
      function isAllChecked() {
          var checkStatus = true;
          var checks = document.getElementsByName("opCheck");
          for (var i = 0; i < checks.length; i++) {
              if (!checks[i].checked) {
                  checkStatus = false;
                  break;
              }
          }
          return checkStatus;
      }

      function checkMe(chk) {
          var CheckBlock = document.getElementById("allCheck");
          if (!chk.checked) {
              CheckBlock.checked = false;
          }
          else {
              if (!isAllChecked()) {
                  CheckBlock.checked = false;
              }
              else
                  CheckBlock.checked = true;
          }
      }

      function checkAll() {
          var checks = document.getElementsByName("opCheck");

          for (var i = 0; i < checks.length; i++) {
              checks[i].checked = true;
          }
      }

      function chooseOption(op) {

      }
  </script>
</head>
 <body>
  <div class="main_wrapper cf">
   <div class="Header cf"></div>
   <div class="Content cf">
    <div class="content_header cf">
     <div class="control_btn">	<a href="index.html"><img src="images/home.png" width="44px" height="44px"/></a>

     </div>
     <div class="heading">
      	<h3 class="heading">iReader 后台管理</h3>

     </div>
    </div>
    <div class="content_function cf">
     <div class="function_options cf">
      <ul class="hmenubar cf">
       <li><a href="#bkMMS" target="_self" onclick="chooseOption(this)" class="clicked">书籍管理</a>

       </li>
       <li><a href="catMMS" target="_self" onclick="chooseOption(this)">类别管理</a>

       </li>
       <li><a href="albumMMS" target="_self" onclick="chooseOption(this)">图书系列管理</a>

       </li>
       <script type="text/javascript" src="../scripts/menu_selection.js"></script>
      </ul>
     </div>
     <div class="function_main cf">
      <form id="Form1" action="#" runat="server" method="post">
          
       <asp:Panel id="container" runat="server" cssclass="PanelStyle">
        <asp:GridView id="bookDataGrid" cssclass="GridViewStyle" runat="server" autogeneratecolumns="False" allowpaging="True" allowsorting="True" cellpadding="4" onrowediting="bookDataGrid_RowEditing" font-bold="False" font-size="Medium" forecolor="#333333" horizontalalign="Center" onrowcancelingedit="bookDataGrid_RowCancelingEdit" onrowdeleting="bookDataGrid_RowDeleting" onrowupdating="bookDataGrid_RowUpdating" onselectedindexchanging="bookDataGrid_SelectedIndexChanging" emptydatatext="无数据" width="100%" emptydatarowstyle-horizontalalign="Center" emptydatarowstyle-verticalalign="Middle" editrowstyle-wrap="True" editrowstyle-horizontalalign="Center" editrowstyle-verticalalign="Middle" showheaderwhenempty="True" selectedrowstyle-forecolor="#FFFFCC" GridLines="None" BorderStyle="Dashed" BorderWidth="1px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:CheckBox ID="allCheck" runat="server" autopostback="true" oncheckedchanged="CheckAll_CheckedChanged" />
                    </HeaderTemplate>
                    <EditItemTemplate>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="opCheck" runat="server" autopostback="true" oncheckedchanged="opCheck_CheckedChanged" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:BoundField datafield="ID" headertext="书籍编号" readonly="True">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:BoundField datafield="Title" headertext="标题">
                <HeaderStyle horizontalalign="Center" verticalalign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:TemplateField headertext="分类">
                    <EditItemTemplate>
                        <asp:DropDownList ID="dpCategory" runat="server" datasource="<%# this.QueryCategories() %>" datatextfield="Title" datavaluefield="ID">
                        </asp:DropDownList>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("CategoryId") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle horizontalalign="Center" verticalalign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField headertext="系列">
                    <EditItemTemplate>
                        <asp:DropDownList ID="dpAlbum" runat="server" datasource="<%# this.QueryAlbums() %>" datatextfield="Title" datavaluefield="ID">
                        </asp:DropDownList>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" text='<%# Bind("AlbumId")  %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle horizontalalign="Center" verticalalign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField headertext="上架时间">
                    <EditItemTemplate>
                        <asp:Calendar ID="Calendar" runat="server" selecteddate='<%# DateTime.Parse(Eval("OnBoardDate").ToString()) %>' visibledate='<%# DateTime.Parse(Eval("OnBoardDate").ToString()) %>'></asp:Calendar>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" text='<%# Bind("CreateTimeTag") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle horizontalalign="Center" verticalalign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField headertext="描述">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" rows="5" text='<%# Bind("Desc") %>' textmode="MultiLine"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" text='<%# Bind("Desc") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle horizontalalign="Center" verticalalign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:BoundField datafield="Score" headertext="得分">
                <HeaderStyle horizontalalign="Center" verticalalign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:CommandField ButtonType="Button" CancelText="" DeleteText="" InsertText="" NewText="" SelectText="" />
            </Columns>
            <EditRowStyle BackColor="#7C6F57" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
            <EmptyDataRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
       </asp:Panel>
       <div style="width:960px;margin-left:auto;margin-right:auto;margin-top:25px">
        <asp:button id="btnDelete" text="删除" runat="server" onclick="btnDelete_Click"></asp:button>
        <asp:button id="btnEdit" text="编辑" runat="server" onclick="btnEdit_Click"></asp:button>
       </div>
      </form>
     </div>
     <div class="function_footer cf"></div>
    </div>
   </div>
   <div class="Footer cf"></div>
  </div>
 </body>
</html>
